// Achievement by G3X / GeXeH - Enjoy
// Version 1.0

// Achievement: Get set the colour pink by another player 3 times.

local Value = achievements.GetValue( "Girl Power", "total", 0 )
local Status = false

local function Update()

	if (Value != 3) then
		// print("Check Started.\n")
		local ply = LocalPlayer()
		local r,g,b,a = ply:GetColor()

		if (!ValidEntity( ply )) then return end
		
		if ( r >= 200 && g <= 50 && b >= 200 && a >= 128 && !SinglePlayer() ) then
			if !Status then
				Status = true
				// print("Player is coloured.\n")
				Value = math.Clamp( Value + 1, 0, 3 )
				achievements.SetValue( "Girl Power", "total", Value )
				achievements.Update( "Girl Power", Value / 3, Value .. "/3" )
			end
		else
			Status = false
			// print("Player is not the correct colour.\n")
		end

		// print("Check Ended.\n")
	
	else
		timer.Destroy("Achievement.GirlPower")
	end

end

timer.Create("Achievement.GirlPower", 1, 0, Update)

achievements.Register( "Girl Power", "Get set the colour pink by another player 3 times.", "achievements/girlpower", Value / 3, Value .. "/3" )